# -*- coding: utf-8 -*-
""" Compomer Factory class
"""

__author__ = """Alexander Artyomenko (artyomenkoav@gmail.com)"""
#   Copyright (C) 2011-2012 by
#   Alex Artyomenko <artyomenkoav@gmail.com>
#   All rights reserved.
#   BSD license.

class CompomerVariant:
    """ Representation of one possible compomer
    """
    mass = 0
    comp = {}
    def __init__(self, comp, mass):
        self.mass = mass
        self.comp = comp
    
    def __repr__(self):
        return "{1}\t{0}\t".format(reduce(lambda x, y : "{}\t{}".format(x, y), map(lambda x : str(str(x[1])), self.comp.items())), self.mass)
